﻿using net.xBei.Models.json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace net.xBei.Models {
    /// <summary>
    /// 
    /// </summary>
    public static class CommonConsts {
        /// <summary>
        /// 
        /// </summary>
        public const string REDISKEY_USERID = "UserId";

        /// <summary>
        /// 
        /// </summary>
        public const string SystemUserId = "ThisIsSystemUser";

        /// <summary>
        /// 星期
        /// </summary>
        public static readonly string[] WeekDays = { @"周日", @"周一", @"周二", @"周三", @"周四", @"周五", @"周六" };


        /// <summary>
        /// 值类型
        /// </summary>
        public enum ValueType {
            /// <summary>
            /// 字符串
            /// </summary>
            STRING,
            /// <summary>
            /// 整形
            /// </summary>
            INT,
            /// <summary>
            /// 日期
            /// </summary>
            DATETIME,
            /// <summary>
            /// 数字
            /// </summary>
            DOUBLE,
        }

        /// <summary>
        /// 
        /// </summary>
        [Flags]
        public enum UserType : int {
            /// <summary>
            /// 游客
            /// </summary>
            GUEST,
            /// <summary>
            /// 普通用户
            /// </summary>
            USER = 1,
            /// <summary>
            /// 后台用户
            /// </summary>
            BACKEND = 2,
            /// <summary>
            /// 管理员
            /// </summary>
            ADMIN = -1,
        }
        /// <summary>
        /// 认证策略
        /// </summary>
        public struct Policy{
            /// <summary>
            /// 后台
            /// </summary>
            public const string Backend = "Backend";
            /// <summary>
            /// 系统
            /// </summary>
            public const string System = "SystemUser";
        }

        public enum SortDirection : int {
            ASC = 1,
            DESC = 2
        }


        #region 支付
        public const string PAYMENT_CHANNEL_ALIPAY = "AliPay";
        public const string PAYMENT_CHANNEL_WECHAT = "WechatPay";
        public const string PAYMENT_CHANNEL_OFFLINE = "Funds";
        public const string PAYMENT_CHANNEL_LABEL_ALIPAY = "支付宝";
        public const string PAYMENT_CHANNEL_LABEL_WECHAT = "微信";
        public const string PAYMENT_CHANNEL_LABEL_OFFLINE = "余额";
        /// <summary>
        /// 付款渠道
        /// </summary>
        public enum PaymentChannel : int {
            /// <summary>
            /// 余额付款
            /// </summary>
            Funds = 0,
            /// <summary>
            /// 支付宝付款
            /// </summary>
            AliPay = 1,
            /// <summary>
            /// 微信付款
            /// </summary>
            WechatPay = 2
        }
        #endregion
    }
}
